
$(function () {

    $('.btnLogin1').on('click', function () {
        // console.log(1)
        let ms = $('form').serialize();
        // console.log(2)
        // console.log(ms)
        $.ajax({
            type: 'post',
            url: '/login',
            dataType: 'json',
            data: ms,
            success: function (res) {
<<<<<<< HEAD
                console.log(res)
=======
>>>>>>> 2fa73e562cd8bb1d6d4cf38fa3196879360d8e55
                if (res.code === 400) {
                    $('.alert-danger >span').text(res.msg)
                    $('.alert-danger').fadeIn(1000).delay(2000).fadeOut(1000)
                } else {

                    location.href = '/admin'
                }
            }

        })


    })




















})

